<template>
  <div>
    <pulldown header="尿液检测记录-常规尿检">
      <div slot="content">
        <RecordList ref="recordList11" :isUroscopy="true"/>
      </div>
    </pulldown>
    <pulldown header="尿液检测记录-突击尿检">
      <div slot="content">
        <RecordList ref="recordList12" :isUroscopy="true"/>
      </div>
    </pulldown>
    <pulldown header="毛发检测记录-常规毛发">
      <div slot="content">
        <RecordList ref="recordList21" :isUroscopy="true"/>
      </div>
    </pulldown>
    <pulldown header="毛发检测记录-突击毛发">
      <div slot="content">
        <RecordList ref="recordList22" :isUroscopy="true"/>
      </div>
    </pulldown>
    <!--    {{$filterDictTextByCache('process_approval_type', 1)}}-->
  </div>
</template>

<script>
import pulldown from '../../../modules/pulldown'
import {basicDetail, Families} from "@api/sjsk/archives";
import RecordList from './uroscopy/RecordList'
import * as uroscopyApi from "@api/sjsk/check/uroscopy";
export default {
  name: "basic",
  components:{ pulldown, RecordList},
  mounted() {

  },
  data(){
    return   {
      resultData:{},
      innse:true,
      user:{},
      loading: false,
    }
  },
  methods:{
    a(){
      console.log('sb')
    },
    refreshTable(){
      this.getRouter()
    },
    getRouter() {
  //尿检
      console.log("尿检")
      this.isUroscopy = true
      // this.title = "尿液检测预约"
      setTimeout(() => {
        this.$refs.recordList11.setUrineType(1)
        this.$refs.recordList11.onQuery()
      }, 500)
  // 发检
      console.log("发检")
      this.isUroscopy = false
      // this.title = "毛发检测预约"
      setTimeout(() => {
        this.$refs.recordList21.setUrineType(3)
        this.$refs.recordList21.onQuery()
      }, 500)
      this.onTabChange1(1)
      this.onTabChange1(2)
      this.onTabChange2(1)
      this.onTabChange2(2)
    },
    onTabChange1(val) {
      if (val == 1) { //常规尿检
        this.$refs.recordList11.setUrineType(1)
        this.$refs.recordList11.onQuery()

      }
      if (val == 2) {//突击尿检
        this.$refs.recordList12.setUrineType(2)
        this.$refs.recordList12.onQuery()

      }
    },
    onTabChange2(val) {
      if (val == 1) { //常规发检
        this.$refs.recordList21.setUrineType(3)
        this.$refs.recordList21.onQuery()
      }
      if (val == 2) {//突击发检
        this.$refs.recordList22.setUrineType(4)
        this.$refs.recordList22.onQuery()
      }
    },
  }
}
</script>

<style scoped>

</style>